package com.jzo2o.foundations.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jzo2o.common.model.PageResult;
import com.jzo2o.foundations.model.domain.Serve;
import com.jzo2o.foundations.model.dto.request.ServePageQueryReqDTO;
import com.jzo2o.foundations.model.dto.request.ServeUpsertReqDTO;
import com.jzo2o.foundations.model.dto.response.ServeAggregationSimpleResDTO;
import com.jzo2o.foundations.model.dto.response.ServeAggregationTypeSimpleResDTO;
import com.jzo2o.foundations.model.dto.response.ServeResDTO;
import com.jzo2o.foundations.model.dto.response.ServeSimpleResDTO;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author itcast
 * @since 2023-07-03
 */
public interface IServeService extends IService<Serve> {

    /**
     * 分页查询服务列表
     * @param servePageQueryReqDTO 查询条件
     * @return 分页结果
     */
    PageResult<ServeResDTO> page(ServePageQueryReqDTO servePageQueryReqDTO);

    void batchAdd(List<ServeUpsertReqDTO> serveUpsertReqDTOList);

    Serve update(Long id, BigDecimal price);

/*    void updateStatus(Long id, int status);*/

    void onSale(Long id);

    void del(Long id);

    void offSale(Long id);

    void onHot(Long id);

    void offHot(Long id);

    int queryServeCountByRegionIdAndSaleStatus(Long id, int status);

    int queryServeCountByServeItemIdAndSaleStatus(Long id, int status);

    List<ServeAggregationTypeSimpleResDTO> getByRegionId(Long regionId);

    List<ServeAggregationSimpleResDTO> getHotServeListByRegionId(Long regionId);

    ServeAggregationSimpleResDTO getServeById(Long id);
}